---
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

# Description: 
# Template file for docker-compose.yml, which is used in testing.

version: '3'
services:
  kibana:
    container_name: opendistroforelasticsearch-kibana-test
    image: {{ registry }}/opendistro-for-elasticsearch-kibana:{{ version_tag }}
    ports:
      - 5601:5601
    networks: [opendistroforelasticsearch]
    environment:
      ELASTICSEARCH_HOSTS: https://elasticsearch:9200

    # Configure certificate and key files to enable SSL. The certificate
    # provided in the example is self-signed, and thus insecure. It should
    # only be used for experimentation, never in production.
    #
    # environment:
    #   - SERVER_SSL_CERT=/usr/share/kibana/config/opendistroforelasticsearch.example.org.crt
    #   - SERVER_SSL_KEY=/usr/share/kibana/config/opendistroforelasticsearch.example.org.key

  elasticsearch:
    container_name: opendistroforelasticsearch-test
    image: {{ registry }}/opendistro-for-elasticsearch:{{ version_tag }}
    networks: [opendistroforelasticsearch]
    environment:
      - discovery.type=single-node
    ports:
      - 9200:9200
      - 9600:9600 # required for Performance Analyzer
networks:
  opendistroforelasticsearch:
